﻿<template>
    <div>
        <h2>这里是Home组件,你跳转到了Home组件</h2>
        <router-link to="/home/news">News</router-link>
        <router-link to="/home/message">Message</router-link>
        <router-view></router-view>
    </div>
</template>

<script>
    export default {
        name:'Home',
        components:{},
        /* mounted(){
            console.log('Home组件挂载完毕了')
        },
        beforeDestroy(){//销毁前都会调用这个生命周期钩子
            console.log('Home组件即将被销毁')
        } */
        mounted(){
            console.log('Home组件挂载完毕了',this)
        }
    }
</script>

<style scoped>

</style>